/*
 * @Author: Jone XIn
 * @Date: 2022-02-07 18:29:27
 * @LastEditTime: 2022-02-07 22:16:20
 * @Description: tips: 下面必须指定【有压缩需求】
 * 1, modelName: '',
 * 2, tableName: '',
 * 3, @Column() datatype 的类型
 */
'use strict'
import { Table, Column, Model, PrimaryKey, AutoIncrement, DataType } from 'sequelize-typescript'

@Table({
    freezeTableName: true,
    modelName: 'User', // 默认就是类名
    tableName: 'user', // 默认就是类名
    timestamps: false
})
export default class User extends Model<User> {
    @PrimaryKey
    @AutoIncrement
    @Column(DataType.INTEGER)
    id: number

    @Column(DataType.STRING)
    name: string

    @Column(DataType.INTEGER)
    age: number

    @Column(DataType.BIGINT)
    phone: number
}